Class org.omg.CORBA.TypeCode
All Packages Class Hierarchy This Package Previous Next Index
Class org.omg.CORBA.TypeCode
java.lang.Object
|
+----org.omg.CORBA.TypeCode
- public class TypeCode
- extends Object
-
TypeCode()
-
-
content_type()
- The content_type operation can be invoked on sequence, array,
and alias TypeCodes.
-
default_index()
- The default_index operation can only be invoked on union
TypeCodes.
-
discriminator_type()
- The discriminator_type operation can only be invoked on union
TypeCodes.
-
equal(TypeCode)
- The equal operation can be invoked on any TypeCode.
-
id()
- The id operation can be invoked on object reference, structure,
union, enumeration, alias, and exception TypeCodes.
-
kind()
-
The kind operation can be invoked on any TypeCode.
-
length()
-
The length operation can be invoked on string, sequence, and
array TypeCodes.
-
member_count()
- The member_count operation can be invoked on structure, union,
and enumeration TypeCodes.
-
member_label(int)
- The member_label operation can only be invoked on union
TypeCodes.
-
member_name(int)
- The member_name operation can be invoked on structure, union,
and enumeration TypeCodes.
-
member_type(int)
- The member_type operation can be invoked on structure and union
TypeCodes.
-
name()
- The name operation can also be invoked on object reference,
structure, union, enumeration, alias, and exception TypeCodes.
TypeCode
public TypeCode()
equal
public abstract boolean equal(TypeCode tc) throws SystemException
- The equal operation can be invoked on any TypeCode. Equal
TypeCodes are interchangeable, and give identical results when
TypeCode operations are applied to them.
- Parameters:
- tc - the TypeCode to compare against.
- Returns:
- true if the typecodes are indeed equal, false
otherwise.
kind
public abstract int kind() throws SystemException
- The kind operation can be invoked on any TypeCode.
- Returns:
- an integer indicating the kind of the
TypeCode. This also determines what other
operations can be invoked on the TypeCode.
id
public abstract String id() throws BadKind, SystemException
- The id operation can be invoked on object reference, structure,
union, enumeration, alias, and exception TypeCodes. It returns
the RepositoryId globally identifying the type. Object
reference and exception TypeCodes always have a RepositoryId.
Structure, union, enumeration, and alias TypeCodes obtained
from the Interface Repository or the ORB::create_operation_list
operation also always have a RepositoryId. Otherwise, the id
operation can return an empty string.
- Returns:
- the RepositoryId for the type.
- Throws: BadKind
- raised if the operation is invoked on an
inappropriate TypeCode kind.
name
public abstract String name() throws BadKind, SystemException
- The name operation can also be invoked on object reference,
structure, union, enumeration, alias, and exception TypeCodes.
It returns the simple name identifying the type within its
enclosing scope. Since names are local to a Repository, the
name returned from a TypeCode may not match the name of the
type in any particular Repository, and may even be an empty
string.
- Returns:
- the name identifying the type.
- Throws: BadKind
- raised if the operation is invoked on an
inappropriate TypeCode kind.
member_count
public abstract int member_count() throws BadKind, SystemException
- The member_count operation can be invoked on structure, union,
and enumeration TypeCodes.
We extend the CORBA specification to allow this operation on
exceptions as well.
- Returns:
- the number of members constituting the type.
- Throws: BadKind
- raised if the operation is invoked on an
inappropriate TypeCode kind.
member_name
public abstract String member_name(int index) throws BadKind, Bounds, SystemException
- The member_name operation can be invoked on structure, union,
and enumeration TypeCodes. It returns the simple name
of the member identified by index. Since names are local to a
Repository, the name returned from a TypeCode may not match the
name of the member in any particular Repository, and may even
be an empty string.
We extend the CORBA specification to allow this operation on
exceptions as well.
- Parameters:
- index - index of member for which name is required.
- Returns:
- simple name of the member identified by the
index.
- Throws: Bounds
- raised if the index is equal or greater than
the number of members constituting the type.
- Throws: BadKind
- raised if the operation is invoked on an
inappropriate TypeCode kind.
member_type
public abstract TypeCode member_type(int index) throws BadKind, Bounds, SystemException
- The member_type operation can be invoked on structure and union
TypeCodes. It returns the TypeCode describing the type of the
member identified by index.
We extend the CORBA specification to allow this operation on
exceptions as well.
- Parameters:
- index - index of member for which type is required.
- Returns:
- TypeCode of the member identified by the
index.
- Throws: Bounds
- raised if the index is equal or greater than
the number of members constituting the type.
- Throws: BadKind
- raised if the operation is invoked on an
inappropriate TypeCode kind.
member_label
public abstract Any member_label(int index) throws BadKind, Bounds, SystemException
- The member_label operation can only be invoked on union
TypeCodes. Member_label returns the label of the union member
identified by index. For the default member, the label is the
zero octet.
- Parameters:
- index - index of member for which label is required.
- Returns:
- an Any describing the label of the member
identified by the index.
- Throws: Bounds
- raised if the index is equal or greater than
the number of members constituting the type.
- Throws: BadKind
- raised if the operation is invoked on
non-union typecode.
discriminator_type
public abstract TypeCode discriminator_type() throws BadKind, SystemException
- The discriminator_type operation can only be invoked on union
TypeCodes. The discriminator_type operation returns the type of
all non-default member labels.
- Returns:
- the type of the non-default member labels.
- Throws: BadKind
- raised if the operation is invoked on
non-union typecode.
default_index
public abstract int default_index() throws BadKind, SystemException
- The default_index operation can only be invoked on union
TypeCodes. The default_index operation returns the index of the
default member, or -1 if there is no default member.
- Returns:
- the index of the default member, or -1 if
there is no default.
- Throws: BadKind
- raised if the operation is invoked on
non-union typecode.
length
public abstract int length() throws BadKind, SystemException
- The length operation can be invoked on string, sequence, and
array TypeCodes. For strings and sequences, it returns the
bound, with zero indicating an unbounded string or sequence.
For arrays, it returns number of elements in the array.
- Returns:
- the bound for strings and sequences, and the
number of elements for arrays.
- Throws: BadKind
- raised if the operation is invoked on an
inappropriate TypeCode kind.
content_type
public abstract TypeCode content_type() throws BadKind, SystemException
- The content_type operation can be invoked on sequence, array,
and alias TypeCodes. For sequences and arrays, it returns the
element type. For aliases, it returns the original type. Note
that multidimensional arrays are represented by nesting
TypeCodes, one per dimension.
- Returns:
- the element type for sequences and arrays, and
the original type for aliases.
- Throws: BadKind
- raised if the operation is invoked on an
inappropriate TypeCode kind.
All Packages Class Hierarchy This Package Previous Next Index